home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / viewwrld / viewwrld.lha / viewworld / lgd / internal.h next >
Encoding:
C/C++ Source or Header  |  1989-09-21  |  3.4 KB  |  72 lines

  1. /* $Id: internal.h,v 1.7 89/09/20 17:49:10 mbp Exp $
  2.  *
  3.  * internal.h: public things which are internal to LGD
  4.  */
  5.  
  6. /************************************************************************
  7.  *        Copyright (C) 1989 by Mark B. Phillips                  *
  8.  *                                     *
  9.  * Permission to use, copy, modify, and distribute this software and    *
  10.  * its documentation for any purpose and without fee is hereby granted, *
  11.  * provided that the above copyright notice appear in all copies and    *
  12.  * that both that copyright notice and this permission notice appear in *
  13.  * supporting documentation, and that the name of Mark B. Phillips or   *
  14.  * the University of Maryland not be used in advertising or publicity   *
  15.  * pertaining to distribution of the software without specific, written *
  16.  * prior permission.  This software is provided "as is" without express *
  17.  * or implied warranty.                                                 *
  18.  ************************************************************************/
  19.  
  20. /* Maximum dimension allowed (right now only dim allowed is 3): */
  21. #define        MAXDIM        3
  22.  
  23. /* Offsets of information in segment headers: */
  24. #define        NAME_OS        1    /* name offset        */
  25. #define        VIS_OS        2    /* visibilty offset    */
  26. #define        LEN_OS        3    /* length offset    */
  27.  
  28. /* External variables; see lgd.c for descriptions */
  29. extern int    lgd_dim;
  30. extern int    lgd_header_length;
  31. extern int    lgd_trailer_length;
  32. extern int    lgd_world_file_fmt;
  33. extern double    lgd_wbox[2][MAXDIM];
  34. extern double    lgd_wscale[MAXDIM];
  35. extern double    lgd_pick_tolerance;
  36.  
  37. /* Error strings: */
  38. #define E_out_of_world    "Attempt to move/draw out of world box"
  39. #define E_pu_noseg    "Attempt to lift pen outside of segment"
  40. #define E_pd_noseg     "Attempt to lower pen outside of segment"
  41. #define E_md_noseg    "Attempt to move/draw outside of segment"
  42. #define E_pt_noseg    "Attempt to draw a point outside of segment"
  43. #define E_cs_noseg    \
  44.     "Attempt to close segment when no segment is open"
  45. #define E_del_non_seg    "Attempt to delete nonexistent segment"
  46. #define E_del_open_seg    "Attempt to delete a currently open segment"
  47. #define E_mf_overflow    "Metafile overflow"
  48. #define E_bad_trunc    "Unsuccessful attempt to truncate metafile"
  49. #define E_bad_compress    "Unsuccessful attempt to compress metafile"
  50. #define E_bad_mf_entry    "Bad entry in metafile"
  51. #define E_bad_dim    "Bad dimension passed to lgd_define_world"
  52. #define E_seg_too_long    "Segment too long: length won't fit in header"
  53. #define E_sw_bad_fname    "Bad file name when attempting to save world"
  54. #define E_sm_bad_write    "Write error while saving metafile"
  55. #define E_lw_bad_fname    "Bad file name when attempting to load world"
  56. #define E_sw_bad_write    "Write error when saving world"
  57. #define E_swd_bad_write    "Write error when saving world definition data"
  58. #define E_swd_bad_read    "Read error when loading world definition data"
  59. #define E_lw_bad_read    "Read error when loading world"
  60. #define E_lw_fmt_clash    "World file format clash"
  61. #define E_svd_bad_write    "Write error when saving world viewing data"
  62. #define E_svd_bad_read    "Read error when loading world viewing data"
  63. #define E_bad_wld_bdy    \
  64.     "Bad world boundary values passed to lgd_define_world"
  65. #define E_visi_noseg    \
  66.     "Attempt to change visibility of nonexistent segment"
  67. #define E_seg_open    \
  68.     "Attempt to open a segment while a segment is open"
  69. #define E_max_segs    "Maximum number of allowed segments exceeded"
  70. #define E_inq_noseg_visi \
  71.      "Attempt to inquire about visibility of nonexistent segment"
  72.